﻿@model PagedList<HouseAgencySite.Models.HouseInfos>
@{
    List<SelectListItem> listHuXing = HouseAgencySite.Utils.ParamHelper.HuXing(true, "");
}
@if (Model.Count > 0)
{
    foreach (var item in Model)
    {
   
  
            <div class="product" onmouseover="this.style.backgroundColor='#F9F9F9';" onmouseout="this.style.backgroundColor='#fff';">
                <div class="product-photo">
                    <img src="@(string.IsNullOrEmpty(item.AttachUrl) ? "/content/images/noimg.jpg" : "/images/_thumbs/" + item.AttachUrl)" width="174" height="130"></div>
                <div class="product-word">
                    <div class="product-word-1"><a href="@Url.Action("Detail", "Home", new { id = item.Guid })" target="_blank"  title="@item.Title" >@item.Title</a></div>
                    <div class="product-word-2">户型：@listHuXing.FirstOrDefault(o => o.Value == item.HuXing.ToString()).Text</div>
                    <div class="product-word-2">地址：@item.AddressDetail</div>
                    <div class="product-word-2">面积：@item.MianJi </div>
                </div>
                <div class="product-price">
                    <span>@(item.Price)</span><em>元</em>
                </div>
            </div>
     
    
    
    }
    <div class="text-center">
        <ul class="pagination " TotalPage="@Model.TotalPageCount">

            <li id="first" style="@(Model.CurrentPageIndex == 1 ? "display:none;" : "")"><a href="javascript:void(0);">首页</a></li>
            <li id="prev" style="@(Model.CurrentPageIndex == 1 ? "display:none;" : "")"><a href="javascript:void(0);">上一页</a></li>
            @for (int i = 1; i <= Model.TotalPageCount; i++)
            {       
                <li class="pageitem @(i == Model.CurrentPageIndex ? "active" : "")"><a href="javascript:void(0);">@(i)</a></li>
            }
            <li id="next"  style="@(Model.CurrentPageIndex == Model.TotalPageCount ? "display:none;" : "")"><a href="javascript:void(0);">下一页</a></li>
            <li id="last"  style="@(Model.CurrentPageIndex == Model.TotalPageCount ? "display:none;" : "")"><a href="javascript:void(0);">末页</a></li>
            <li><a>共<strong style="color: red;">@(Model.TotalItemCount)</strong>条记录</a></li>
        </ul>
    </div>
}
else
{ 
    <div class="alert alert-danger text-center">暂无满足条件的信息！</div>
}

<script src="~/Scripts/Pager.js"></script>
